package com.etbsms.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "Report_Problem")
public class ReportProblem implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7576822650677471316L;
	
	private int seq_no;
	private String problem_desc;
	private String handle_desc;
	private int state;
	private boolean reply;
	private Users users;
	private Date problem_date;
	private Date handle_date;
	

	@Id 
	@Column(name = "seq_no" ,nullable = false)
	@GeneratedValue(generator = "paymentableGenerator")       
	@GenericGenerator(name = "paymentableGenerator", strategy = "identity")  
	public int getSeq_no() {
		return seq_no;
	}
	public void setSeq_no(int seq_no) {
		this.seq_no = seq_no;
	}
	
	@Column(nullable = false,length=2048)
	public String getProblem_desc() {
		return problem_desc;
	}
	public void setProblem_desc(String problem_desc) {
		this.problem_desc = problem_desc;
	}
	
	@Column(nullable = true,length=2048)
	public String getHandle_desc() {
		return handle_desc;
	}
	public void setHandle_desc(String handle_desc) {
		this.handle_desc = handle_desc;
	}
	
	@Column(nullable = false)
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	
	@Column(nullable = false)
	public boolean isReply() {
		return reply;
	}
	public void setReply(boolean reply) {
		this.reply = reply;
	}
	
	@ManyToOne
	@JoinColumn(name="Users_seqNo")
	public Users getUsers() {
		return users;
	}
	public void setUsers(Users users) {
		this.users = users;
	}
	
	@Column(nullable = false)
	@Temporal(TemporalType.TIMESTAMP)
	public Date getProblem_date() {
		return problem_date;
	}
	public void setProblem_date(Date problem_date) {
		this.problem_date = problem_date;
	}
	
	@Column(nullable = true)
	@Temporal(TemporalType.TIMESTAMP)
	public Date getHandle_date() {
		return handle_date;
	}
	public void setHandle_date(Date handle_date) {
		this.handle_date = handle_date;
	}
}
